<template>
  <div class="app">
    <p><img :src="list.img" alt=""></p>
    <p>片名：{{list.nm}}</p>
    <p>主演：{{list.star}}</p>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data () {
    return {
      list: []
    }
  },
  created () {
    axios.post('/datalist').then(res => {
      // console.log(res.data.movieList)
      res.data.movieList.forEach(item => {
        if (item.id === +this.$route.query.id) {
          // console.log(123)
          this.list = item
        }
      })
    })
  }
}
</script>

<style lang="less">
.app >p{
  margin-top: 15px;
  width: 100%;
  text-align: center;
}
</style>
